#ifndef SCRIPTTASK_H
#define SCRIPTTASK_H

#include <defs/export.h>
#include <defs/global.h>
#include <core/task.h>

#include <QtCore>
namespace Opl{ namespace Scripting {


class ScriptEnvironment;
O_PRIVATE_DECLARE(ScriptTask);
class SCRIPTING_EXPORT ScriptTask : public Opl::Core::Task {
    Q_OBJECT
public:
    ScriptTask(Opl::Core::Task *parent = 0);
    ScriptTask(ScriptEnvironment* environment, const QString& script);
    virtual ~ScriptTask();

protected:
	virtual void changeSource(const QString& script);
	virtual void run();
	virtual void setup();
	virtual void cleanup();
private slots:
private:
    O_PRIVATE_DECLARE_MEMBER(ScriptTask);
};
};};

#endif // SCRIPTTASK_H

